﻿using B.MES.Customer.Domain;
using B.MES.Customer.Domain.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.MES.Customer.Application.IApplication
{
    public interface IBOMApplication:IBaseApplication<BomTab>
    {
        /// <summary>
        /// 添加 BOM 信息方法
        /// </summary>
        /// <param name="bom">要添加的 BOM 信息对象</param>
        int AddBom(BOMDto bom);
        /// <summary>
        /// 绑定成品类型
        /// </summary>
        /// <returns>成品类型列表</returns>
        List<ArtifactType> GetArtifacTypeList();
        /// <summary>
        /// 获取显示、分页、查询Bom列表
        /// </summary>
        /// <param name="bomTopic">Bom主题</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页显示条数</param>
        /// <returns>Bom列表信息</returns>
        PageApiResut<BomTab> GetBom(string? bomTopic, int pageIndex, int pageSize);
        /// <summary>
        /// 编辑Bom信息
        /// </summary>
        /// <param name="bomId">bom表主键</param>
        /// <returns>返回Bom实体</returns>
        BomTab GetBomTabById(int bomId);
        /// <summary>
        /// 修改Bom信息
        /// </summary>
        /// <param name="bom">要添加的 BOM 信息对象</param>
        /// <returns> 受影响行数</returns>
        int UpdBomInfoById(BomTab bom);
        /// <summary>
        /// 获取Bom详情
        /// </summary>
        /// <param name="bomId">bom表主键</param>
        /// <returns> 获取Bom详情</returns>
        APIResult<BOMDto> GetBomDetail(int bomId);
        /// <summary>
        /// 获取BOM下的物料信息
        /// </summary>
        /// <param name="bomId"> BomId</param>
        /// <returns> 物料信息</returns>
        PageApiResut<Material> GetMaterialsByBOMId(int bomId);
        /// <summary>
        /// 显示Bom列表
        /// </summary>
        /// <returns>Bom列表信息</returns>
        List<BomTab> GetBomList();
        /// <summary>
        /// 删除Bom信息
        /// </summary>
        /// <param name="bomId">BomId</param>
        /// <returns>受影响行数</returns>
        int DelBomById(int bomId);
    }
}
